function [max, k, l ] = FindOptimalForJacobi( A, b )
maxRow = 1;
for i = 1 : size(b, 1)
    if b(i) > b(maxRow)
        maxRow = i;
    end;
end;
max = 0;
k = maxRow;
if (maxRow ~= 1)
    l = maxRow - 1;
else
    l = maxRow + 1;
end;
for j = 1 : size(A, 2)
    if abs(A(maxRow, j)) > abs(max) && j ~= maxRow
        max = A(maxRow, j);
        l = j;
    end;
end;
end

